package com.xiaoyu.lanling.feature.unregister

import android.os.Bundle
import com.xiaoyu.base.app.GlobalUI
import com.xiaoyu.base.utils.ClipboardUtils
import com.xiaoyu.base.utils.extensions.setOnClickDebounceListener
import com.xiaoyu.lanling.R
import com.xiaoyu.lanling.activity.base.AppCompatToolbarActivity
import kotlinx.android.synthetic.main.activity_unregister.*

class UnregisterActivity : AppCompatToolbarActivity() {

    override fun onCreateSafelyAfterAppFinishInit(savedInstanceState: Bundle?) {
        super.onCreateSafelyAfterAppFinishInit(savedInstanceState)
        setLightStatusBar()
        setContentView(R.layout.activity_unregister)
        initToolbar()

        initView()
        initBind()
    }

    private fun initView() {
        title = getString(R.string.unregister_title)
    }

    private fun initBind() {
        email_copy_desc.setOnClickDebounceListener {
            ClipboardUtils.clipboardText(email.text?.toString())
            GlobalUI.getInstance().showToast(getString(R.string.unregister_email_copy_success))
        }
    }
}